<include file="public/layout" />
<style>
    td{height:40px;line-height:40px; padding-left:20px;}
    .span_1{
        float:left;
        margin-left:0px;
        height:130px;
        line-height:130px;
    }
    .span_1 ul{list-style:none;padding:0px;}
    .span_1 ul li{
        border:1px solid #CCC;
        height:40px;
        padding:0px 10px;
        margin-left:-1px;
        margin-top:-1px;
        line-height:40px;
    }
</style>
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <form class="form-horizontal" id="user_form" method="post">
        <div class="ncap-form-default">
           <dl class="row">
                <dt class="tit">
                    <label for="balance"><em>*</em>余额变动</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="balance" id="balance" class="input-txt">
                    <span class="err"></span>
                    <p class="notic">余额变动</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="integral"><em>*</em>积分变动</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="integral" id="integral" class="input-txt">
                    <span class="err"></span>
                    <p class="notic">余额变动</p>
                </dd>
            </dl>
            <input type="hidden" name="id" value="{$data.id}">
            <div class="bot"><a href="JavaScript:void(0);" onclick="select_goods();" class="ncap-btn-big ncap-btn-green">确认提交</a></div>
        </div>
    </form>
</div>
<script type="text/javascript">

    function select_goods()
    {
        var balance = $("input[name='balance']").val();
        var integral = $("input[name='integral']").val();
        var id = $("input[name='id']").val();
        var da = {
            'balance' : balance,
            'integral' : integral,
            'id' : id,
        }

        $.ajax({
            type : "POST",
            url:'/index.php/Admin/Plugins.Vpay/updateBalanceIntegral',
            data : da,
            dataType: "json",
            success: function(data){
                window.parent.call_back(1);
            },
            error:function(data){
                console.log(data)
                // showErrorMsg(data);
            }
        });
    }
</script>
</body>
</html>